//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS RUM service.
///
/// With Amazon CloudWatch RUM, you can perform real-user monitoring to collect client-side data about  your web application performance from actual user sessions in real time. The data collected includes page load  times, client-side errors, and user behavior. When you view this data, you can see it all aggregated together and  also see breakdowns by the browsers and devices that your customers use. You can use the collected data to quickly identify and debug client-side performance issues. CloudWatch  RUM helps you visualize anomalies in your application performance and find relevant debugging data such as error  messages, stack traces, and user sessions. You can also use RUM to  understand the range of end-user impact including the number of users, geolocations, and browsers used.
public struct RUM: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the RUM client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "RUM",
            serviceIdentifier: "rum",
            serviceProtocol: .restjson,
            apiVersion: "2018-05-10",
            endpoint: endpoint,
            errorType: RUMErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Specifies the extended metrics and custom metrics that you want a CloudWatch RUM app monitor to send to a destination. Valid destinations include CloudWatch and Evidently. By default, RUM app monitors send some metrics to CloudWatch. These default metrics are listed in CloudWatch metrics that you can collect  with CloudWatch RUM. In addition to these default metrics, you can choose to send extended metrics, custom metrics, or both.   Extended metrics let you send metrics with additional dimensions that aren't included in the default metrics. You can also send extended metrics to both Evidently and CloudWatch. The valid dimension names for the additional dimensions for extended metrics are BrowserName, CountryCode, DeviceType, FileType, OSName, and PageId. For more information, see  Extended metrics that you can send to CloudWatch and CloudWatch Evidently.   Custom metrics are metrics that you define. You can send custom metrics to CloudWatch. CloudWatch Evidently, or both. With custom metrics, you can use any metric name and namespace. To derive the metrics, you can use any custom events, built-in events, custom attributes, or default attributes.  You can't send custom metrics to the AWS/RUM namespace. You must send custom metrics to a  custom namespace that you define. The namespace that you use can't start with AWS/.  CloudWatch RUM prepends RUM/CustomMetrics/ to the custom namespace that you define,  so the final namespace for your metrics in CloudWatch is  RUM/CustomMetrics/your-custom-namespace .   The maximum number of metric definitions that you can specify in one  BatchCreateRumMetricDefinitions operation is 200. The maximum number of metric definitions that one destination can contain is 2000. Extended metrics sent to CloudWatch and RUM custom metrics are charged as CloudWatch custom metrics. Each combination of additional dimension name and dimension value counts as a custom metric. For more information, see  Amazon CloudWatch Pricing. You must have already created a destination for the metrics before you send them. For more information, see  PutRumMetricsDestination. If some metric definitions specified in a BatchCreateRumMetricDefinitions operations are not valid, those metric definitions fail and return errors, but all valid metric definitions in the same operation still succeed.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchCreateRumMetricDefinitions.html
    @Sendable
    @inlinable
    public func batchCreateRumMetricDefinitions(_ input: BatchCreateRumMetricDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchCreateRumMetricDefinitionsResponse {
        try await self.client.execute(
            operation: "BatchCreateRumMetricDefinitions", 
            path: "/rummetrics/{AppMonitorName}/metrics", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Specifies the extended metrics and custom metrics that you want a CloudWatch RUM app monitor to send to a destination. Valid destinations include CloudWatch and Evidently. By default, RUM app monitors send some metrics to CloudWatch. These default metrics are listed in CloudWatch metrics that you can collect  with CloudWatch RUM. In addition to these default metrics, you can choose to send extended metrics, custom metrics, or both.   Extended metrics let you send metrics with additional dimensions that aren't included in the default metrics. You can also send extended metrics to both Evidently and CloudWatch. The valid dimension names for the additional dimensions for extended metrics are BrowserName, CountryCode, DeviceType, FileType, OSName, and PageId. For more information, see  Extended metrics that you can send to CloudWatch and CloudWatch Evidently.   Custom metrics are metrics that you define. You can send custom metrics to CloudWatch. CloudWatch Evidently, or both. With custom metrics, you can use any metric name and namespace. To derive the metrics, you can use any custom events, built-in events, custom attributes, or default attributes.  You can't send custom metrics to the AWS/RUM namespace. You must send custom metrics to a  custom namespace that you define. The namespace that you use can't start with AWS/.  CloudWatch RUM prepends RUM/CustomMetrics/ to the custom namespace that you define,  so the final namespace for your metrics in CloudWatch is  RUM/CustomMetrics/your-custom-namespace .   The maximum number of metric definitions that you can specify in one  BatchCreateRumMetricDefinitions operation is 200. The maximum number of metric definitions that one destination can contain is 2000. Extended metrics sent to CloudWatch and RUM custom metrics are charged as CloudWatch custom metrics. Each combination of additional dimension name and dimension value counts as a custom metric. For more information, see  Amazon CloudWatch Pricing. You must have already created a destination for the metrics before you send them. For more information, see  PutRumMetricsDestination. If some metric definitions specified in a BatchCreateRumMetricDefinitions operations are not valid, those metric definitions fail and return errors, but all valid metric definitions in the same operation still succeed.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchCreateRumMetricDefinitions.html
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that is to send the metrics.
    ///   - destination: The destination to send the metrics to. Valid values are CloudWatch and Evidently. If you specify Evidently, you must also specify the Amazon Resource Name (ARN) of the CloudWatchEvidently experiment that will receive the metrics and an IAM role that has permission to write to the experiment.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that is to receive the metrics. You must have already defined this  experiment as a valid destination. For more information, see PutRumMetricsDestination.
    ///   - metricDefinitions: An array of structures which define the metrics that you want to send.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchCreateRumMetricDefinitions(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        metricDefinitions: [MetricDefinitionRequest],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchCreateRumMetricDefinitionsResponse {
        let input = BatchCreateRumMetricDefinitionsRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            metricDefinitions: metricDefinitions
        )
        return try await self.batchCreateRumMetricDefinitions(input, logger: logger)
    }

    /// Removes the specified metrics from being sent to an extended metrics destination. If some metric definition IDs specified in a BatchDeleteRumMetricDefinitions operations are not valid, those metric definitions fail and return errors, but all valid metric definition IDs in the same operation are still  deleted. The maximum number of metric definitions that you can specify in one  BatchDeleteRumMetricDefinitions operation is 200.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchDeleteRumMetricDefinitions.html
    @Sendable
    @inlinable
    public func batchDeleteRumMetricDefinitions(_ input: BatchDeleteRumMetricDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchDeleteRumMetricDefinitionsResponse {
        try await self.client.execute(
            operation: "BatchDeleteRumMetricDefinitions", 
            path: "/rummetrics/{AppMonitorName}/metrics", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified metrics from being sent to an extended metrics destination. If some metric definition IDs specified in a BatchDeleteRumMetricDefinitions operations are not valid, those metric definitions fail and return errors, but all valid metric definition IDs in the same operation are still  deleted. The maximum number of metric definitions that you can specify in one  BatchDeleteRumMetricDefinitions operation is 200.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchDeleteRumMetricDefinitions.html
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that is sending these metrics.
    ///   - destination: Defines the destination where you want to stop sending the specified metrics. Valid values are CloudWatch and Evidently. If you specify Evidently, you must also specify the ARN of the CloudWatchEvidently experiment that is to  be the destination and an IAM role that has permission to write to the experiment.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter.  This parameter specifies the ARN of the Evidently experiment that was receiving the metrics that are being deleted.
    ///   - metricDefinitionIds: An array of structures which define the metrics that you want to stop sending.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchDeleteRumMetricDefinitions(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        metricDefinitionIds: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchDeleteRumMetricDefinitionsResponse {
        let input = BatchDeleteRumMetricDefinitionsRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            metricDefinitionIds: metricDefinitionIds
        )
        return try await self.batchDeleteRumMetricDefinitions(input, logger: logger)
    }

    /// Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchGetRumMetricDefinitions.html
    @Sendable
    @inlinable
    public func batchGetRumMetricDefinitions(_ input: BatchGetRumMetricDefinitionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchGetRumMetricDefinitionsResponse {
        try await self.client.execute(
            operation: "BatchGetRumMetricDefinitions", 
            path: "/rummetrics/{AppMonitorName}/metrics", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/BatchGetRumMetricDefinitions.html
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that is sending the metrics.
    ///   - destination: The type of destination that you want to view metrics for. Valid values are CloudWatch  and Evidently.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that corresponds to the destination.
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100. To retrieve the remaining results, make another call with the returned  NextToken value.
    ///   - nextToken: Use the token returned by the previous operation to request the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchGetRumMetricDefinitions(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchGetRumMetricDefinitionsResponse {
        let input = BatchGetRumMetricDefinitionsRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.batchGetRumMetricDefinitions(input, logger: logger)
    }

    /// Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM. The data includes performance and reliability information such as page load time, client-side errors,  and user behavior. You use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor instead. After you create an app monitor, sign in to the CloudWatch RUM console to get  the JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/CreateAppMonitor.html
    @Sendable
    @inlinable
    public func createAppMonitor(_ input: CreateAppMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAppMonitorResponse {
        try await self.client.execute(
            operation: "CreateAppMonitor", 
            path: "/appmonitor", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM. The data includes performance and reliability information such as page load time, client-side errors,  and user behavior. You use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor instead. After you create an app monitor, sign in to the CloudWatch RUM console to get  the JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/CreateAppMonitor.html
    ///
    /// Parameters:
    ///   - appMonitorConfiguration: A structure that contains much of the configuration data for the app monitor. If you are using  Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the  Amazon Cognito identity pool to use for authorization. If you don't include AppMonitorConfiguration, you must set up your own  authorization method. For more information, see  Authorize your application to send data to Amazon Web Services. If you omit this argument, the sample rate used for RUM is set to 10% of the user sessions.
    ///   - customEvents: Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are DISABLED. For more information about custom events, see  Send custom events.
    ///   - cwLogEnabled: Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM  sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges. If you omit this parameter, the default is false.
    ///   - deobfuscationConfiguration:  A structure that contains the configuration for how an app monitor can deobfuscate stack traces.
    ///   - domain: The top-level internet domain name for which your application has administrative authority.
    ///   - domainList:  List the domain names for which your application has administrative authority. The CreateAppMonitor requires either the domain or the domain list.
    ///   - name: A name for the app monitor.
    ///   - tags: Assigns one or more tags (key-value pairs) to the app monitor. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can associate as many as 50 tags with an app monitor. For more information, see Tagging Amazon Web Services resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAppMonitor(
        appMonitorConfiguration: AppMonitorConfiguration? = nil,
        customEvents: CustomEvents? = nil,
        cwLogEnabled: Bool? = nil,
        deobfuscationConfiguration: DeobfuscationConfiguration? = nil,
        domain: String? = nil,
        domainList: [String]? = nil,
        name: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAppMonitorResponse {
        let input = CreateAppMonitorRequest(
            appMonitorConfiguration: appMonitorConfiguration, 
            customEvents: customEvents, 
            cwLogEnabled: cwLogEnabled, 
            deobfuscationConfiguration: deobfuscationConfiguration, 
            domain: domain, 
            domainList: domainList, 
            name: name, 
            tags: tags
        )
        return try await self.createAppMonitor(input, logger: logger)
    }

    /// Deletes an existing app monitor. This immediately stops the collection of data.
    @Sendable
    @inlinable
    public func deleteAppMonitor(_ input: DeleteAppMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAppMonitorResponse {
        try await self.client.execute(
            operation: "DeleteAppMonitor", 
            path: "/appmonitor/{Name}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an existing app monitor. This immediately stops the collection of data.
    ///
    /// Parameters:
    ///   - name: The name of the app monitor to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAppMonitor(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAppMonitorResponse {
        let input = DeleteAppMonitorRequest(
            name: name
        )
        return try await self.deleteAppMonitor(input, logger: logger)
    }

    /// Removes the association of a resource-based policy from an app monitor.
    @Sendable
    @inlinable
    public func deleteResourcePolicy(_ input: DeleteResourcePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteResourcePolicyResponse {
        try await self.client.execute(
            operation: "DeleteResourcePolicy", 
            path: "/appmonitor/{Name}/policy", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the association of a resource-based policy from an app monitor.
    ///
    /// Parameters:
    ///   - name: The app monitor that you want to remove the resource policy from.
    ///   - policyRevisionId: Specifies a specific policy revision to delete. Provide a PolicyRevisionId to ensure an atomic delete operation.  If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an InvalidPolicyRevisionIdException error.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteResourcePolicy(
        name: String,
        policyRevisionId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteResourcePolicyResponse {
        let input = DeleteResourcePolicyRequest(
            name: name, 
            policyRevisionId: policyRevisionId
        )
        return try await self.deleteResourcePolicy(input, logger: logger)
    }

    /// Deletes a destination for CloudWatch RUM extended metrics, so that the specified app monitor stops sending extended metrics to that destination.
    @Sendable
    @inlinable
    public func deleteRumMetricsDestination(_ input: DeleteRumMetricsDestinationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRumMetricsDestinationResponse {
        try await self.client.execute(
            operation: "DeleteRumMetricsDestination", 
            path: "/rummetrics/{AppMonitorName}/metricsdestination", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a destination for CloudWatch RUM extended metrics, so that the specified app monitor stops sending extended metrics to that destination.
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the app monitor that is sending metrics to the destination that you want to delete.
    ///   - destination: The type of destination to delete. Valid values are CloudWatch and Evidently.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that corresponds to the destination to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRumMetricsDestination(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRumMetricsDestinationResponse {
        let input = DeleteRumMetricsDestinationRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn
        )
        return try await self.deleteRumMetricsDestination(input, logger: logger)
    }

    /// Retrieves the complete configuration information for one app monitor.
    @Sendable
    @inlinable
    public func getAppMonitor(_ input: GetAppMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAppMonitorResponse {
        try await self.client.execute(
            operation: "GetAppMonitor", 
            path: "/appmonitor/{Name}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the complete configuration information for one app monitor.
    ///
    /// Parameters:
    ///   - name: The app monitor to retrieve information for.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAppMonitor(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAppMonitorResponse {
        let input = GetAppMonitorRequest(
            name: name
        )
        return try await self.getAppMonitor(input, logger: logger)
    }

    /// Retrieves the raw performance events that RUM has collected from your web application, so that you can do your own processing or analysis of this data.
    @Sendable
    @inlinable
    public func getAppMonitorData(_ input: GetAppMonitorDataRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAppMonitorDataResponse {
        try await self.client.execute(
            operation: "GetAppMonitorData", 
            path: "/appmonitor/{Name}/data", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the raw performance events that RUM has collected from your web application, so that you can do your own processing or analysis of this data.
    ///
    /// Parameters:
    ///   - filters: An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
    ///   - maxResults: The maximum number of results to return in one operation.
    ///   - name: The name of the app monitor that collected the data that you want to retrieve.
    ///   - nextToken: Use the token returned by the previous operation to request the next page of results.
    ///   - timeRange: A structure that defines the time range that you want to retrieve results from.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAppMonitorData(
        filters: [QueryFilter]? = nil,
        maxResults: Int? = nil,
        name: String,
        nextToken: String? = nil,
        timeRange: TimeRange,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAppMonitorDataResponse {
        let input = GetAppMonitorDataRequest(
            filters: filters, 
            maxResults: maxResults, 
            name: name, 
            nextToken: nextToken, 
            timeRange: timeRange
        )
        return try await self.getAppMonitorData(input, logger: logger)
    }

    /// Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.
    @Sendable
    @inlinable
    public func getResourcePolicy(_ input: GetResourcePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetResourcePolicyResponse {
        try await self.client.execute(
            operation: "GetResourcePolicy", 
            path: "/appmonitor/{Name}/policy", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.
    ///
    /// Parameters:
    ///   - name: The name of the app monitor that is associated with the resource-based policy that you want to view.
    ///   - logger: Logger use during operation
    @inlinable
    public func getResourcePolicy(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetResourcePolicyResponse {
        let input = GetResourcePolicyRequest(
            name: name
        )
        return try await self.getResourcePolicy(input, logger: logger)
    }

    /// Returns a list of the Amazon CloudWatch RUM app monitors in the account.
    @Sendable
    @inlinable
    public func listAppMonitors(_ input: ListAppMonitorsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAppMonitorsResponse {
        try await self.client.execute(
            operation: "ListAppMonitors", 
            path: "/appmonitors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of the Amazon CloudWatch RUM app monitors in the account.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100.
    ///   - nextToken: Use the token returned by the previous operation to request the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAppMonitors(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAppMonitorsResponse {
        let input = ListAppMonitorsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAppMonitors(input, logger: logger)
    }

    /// Returns a list of destinations that you have created to receive RUM extended metrics,  for the specified app monitor. For more information about extended metrics, see AddRumMetrics.
    @Sendable
    @inlinable
    public func listRumMetricsDestinations(_ input: ListRumMetricsDestinationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListRumMetricsDestinationsResponse {
        try await self.client.execute(
            operation: "ListRumMetricsDestinations", 
            path: "/rummetrics/{AppMonitorName}/metricsdestination", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of destinations that you have created to receive RUM extended metrics,  for the specified app monitor. For more information about extended metrics, see AddRumMetrics.
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the app monitor associated with the destinations that you want to retrieve.
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100. To retrieve the remaining results, make another call with the returned  NextToken value.
    ///   - nextToken: Use the token returned by the previous operation to request the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listRumMetricsDestinations(
        appMonitorName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListRumMetricsDestinationsResponse {
        let input = ListRumMetricsDestinationsRequest(
            appMonitorName: appMonitorName, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listRumMetricsDestinations(input, logger: logger)
    }

    /// Displays the tags associated with a CloudWatch RUM resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays the tags associated with a CloudWatch RUM resource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource that you want to see the tags of.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it. Each app monitor can  have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see Using resource-based policies with CloudWatch RUM.
    @Sendable
    @inlinable
    public func putResourcePolicy(_ input: PutResourcePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutResourcePolicyResponse {
        try await self.client.execute(
            operation: "PutResourcePolicy", 
            path: "/appmonitor/{Name}/policy", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it. Each app monitor can  have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see Using resource-based policies with CloudWatch RUM.
    ///
    /// Parameters:
    ///   - name: The name of the app monitor that you want to apply this resource-based policy to. To find the names of your app monitors, you can use the ListAppMonitors operation.
    ///   - policyDocument: The JSON to use as the resource policy. The document can be up to 4 KB in size. For more information about the contents and syntax  for this policy, see Using resource-based policies with CloudWatch RUM.
    ///   - policyRevisionId: A string value that you can use to conditionally update your policy. You can provide the revision ID of your existing policy to make mutating requests against that policy. When you assign a policy revision ID, then later requests about that policy will be rejected with an InvalidPolicyRevisionIdException error if they don't provide the correct current revision ID.
    ///   - logger: Logger use during operation
    @inlinable
    public func putResourcePolicy(
        name: String,
        policyDocument: String,
        policyRevisionId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutResourcePolicyResponse {
        let input = PutResourcePolicyRequest(
            name: name, 
            policyDocument: policyDocument, 
            policyRevisionId: policyRevisionId
        )
        return try await self.putResourcePolicy(input, logger: logger)
    }

    /// Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code  snippet that RUM generates for you to add to your application includes PutRumEvents operations to  send this data to RUM. Each PutRumEvents operation can send a batch of events from one user session.
    @Sendable
    @inlinable
    public func putRumEvents(_ input: PutRumEventsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutRumEventsResponse {
        try await self.client.execute(
            operation: "PutRumEvents", 
            path: "/appmonitors/{Id}/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            hostPrefix: "dataplane.", 
            logger: logger
        )
    }
    /// Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code  snippet that RUM generates for you to add to your application includes PutRumEvents operations to  send this data to RUM. Each PutRumEvents operation can send a batch of events from one user session.
    ///
    /// Parameters:
    ///   - alias: If the app monitor uses a resource-based policy that requires PutRumEvents requests to specify a certain alias, specify that alias here. This alias will be compared to the rum:alias context key in the resource-based policy.  For more information, see Using resource-based policies with CloudWatch RUM.
    ///   - appMonitorDetails: A structure that contains information about the app monitor that collected this telemetry information.
    ///   - batchId: A unique identifier for this batch of RUM event data.
    ///   - id: The ID of the app monitor that is sending this data.
    ///   - rumEvents: An array of structures that contain the telemetry event data.
    ///   - userDetails: A structure that contains information about the user session that this batch of events was collected from.
    ///   - logger: Logger use during operation
    @inlinable
    public func putRumEvents(
        alias: String? = nil,
        appMonitorDetails: AppMonitorDetails,
        batchId: String,
        id: String,
        rumEvents: [RumEvent],
        userDetails: UserDetails,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutRumEventsResponse {
        let input = PutRumEventsRequest(
            alias: alias, 
            appMonitorDetails: appMonitorDetails, 
            batchId: batchId, 
            id: id, 
            rumEvents: rumEvents, 
            userDetails: userDetails
        )
        return try await self.putRumEvents(input, logger: logger)
    }

    /// Creates or updates a destination to receive extended metrics from CloudWatch RUM. You can send extended metrics to CloudWatch or to a CloudWatch Evidently experiment. For more information about extended metrics, see BatchCreateRumMetricDefinitions.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/PutRumMetricsDestination.html
    @Sendable
    @inlinable
    public func putRumMetricsDestination(_ input: PutRumMetricsDestinationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutRumMetricsDestinationResponse {
        try await self.client.execute(
            operation: "PutRumMetricsDestination", 
            path: "/rummetrics/{AppMonitorName}/metricsdestination", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates a destination to receive extended metrics from CloudWatch RUM. You can send extended metrics to CloudWatch or to a CloudWatch Evidently experiment. For more information about extended metrics, see BatchCreateRumMetricDefinitions.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/PutRumMetricsDestination.html
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that will send the metrics.
    ///   - destination: Defines the destination to send the metrics to. Valid values are CloudWatch and Evidently. If you specify Evidently, you must also specify the ARN of the CloudWatchEvidently experiment that is to  be the destination and an IAM role that has permission to write to the experiment.
    ///   - destinationArn: Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
    ///   - iamRoleArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, don't use this parameter. This parameter specifies the ARN of an IAM role that RUM will assume to write to the Evidently  experiment that you are sending metrics to. This role must have permission to write to that experiment. If you specify this parameter, you must be signed on to a role that has PassRole permissions attached to it, to allow the role to be passed. The  CloudWatchAmazonCloudWatchRUMFullAccess policy doesn't include PassRole permissions.
    ///   - logger: Logger use during operation
    @inlinable
    public func putRumMetricsDestination(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        iamRoleArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutRumMetricsDestinationResponse {
        let input = PutRumMetricsDestinationRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            iamRoleArn: iamRoleArn
        )
        return try await self.putRumMetricsDestination(input, logger: logger)
    }

    /// Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently,  the only resources that  can be tagged app monitors. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can use the TagResource action with a resource that already has tags.  If you specify a new tag key for the resource,  this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. You can associate as many as 50 tags with a resource. For more information, see Tagging Amazon Web Services resources.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently,  the only resources that  can be tagged app monitors. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can use the TagResource action with a resource that already has tags.  If you specify a new tag key for the resource,  this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. You can associate as many as 50 tags with a resource. For more information, see Tagging Amazon Web Services resources.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the CloudWatch RUM resource that you're adding tags to.
    ///   - tags: The list of key-value pairs to associate with the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from the specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the CloudWatch RUM resource that you're removing tags from.
    ///   - tagKeys: The list of tag keys to remove from the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept. You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource. To create a new app monitor, use CreateAppMonitor. After you update an app monitor, sign in to the CloudWatch RUM console to get  the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
    @Sendable
    @inlinable
    public func updateAppMonitor(_ input: UpdateAppMonitorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAppMonitorResponse {
        try await self.client.execute(
            operation: "UpdateAppMonitor", 
            path: "/appmonitor/{Name}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept. You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource. To create a new app monitor, use CreateAppMonitor. After you update an app monitor, sign in to the CloudWatch RUM console to get  the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
    ///
    /// Parameters:
    ///   - appMonitorConfiguration: A structure that contains much of the configuration data for the app monitor. If you are using  Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the  Amazon Cognito identity pool to use for authorization. If you don't include AppMonitorConfiguration, you must set up your own  authorization method. For more information, see  Authorize your application to send data to Amazon Web Services.
    ///   - customEvents: Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to be DISABLED. For more information about custom events, see  Send custom events.
    ///   - cwLogEnabled: Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM  sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.
    ///   - deobfuscationConfiguration:  A structure that contains the configuration for how an app monitor can deobfuscate stack traces.
    ///   - domain: The top-level internet domain name for which your application has administrative authority.
    ///   - domainList:  List the domain names for which your application has administrative authority. The UpdateAppMonitor allows either the domain or the domain list.
    ///   - name: The name of the app monitor to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAppMonitor(
        appMonitorConfiguration: AppMonitorConfiguration? = nil,
        customEvents: CustomEvents? = nil,
        cwLogEnabled: Bool? = nil,
        deobfuscationConfiguration: DeobfuscationConfiguration? = nil,
        domain: String? = nil,
        domainList: [String]? = nil,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAppMonitorResponse {
        let input = UpdateAppMonitorRequest(
            appMonitorConfiguration: appMonitorConfiguration, 
            customEvents: customEvents, 
            cwLogEnabled: cwLogEnabled, 
            deobfuscationConfiguration: deobfuscationConfiguration, 
            domain: domain, 
            domainList: domainList, 
            name: name
        )
        return try await self.updateAppMonitor(input, logger: logger)
    }

    /// Modifies one existing metric definition for CloudWatch RUM extended metrics. For  more information about extended metrics, see BatchCreateRumMetricsDefinitions.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/UpdateRumMetricDefinitions.html
    @Sendable
    @inlinable
    public func updateRumMetricDefinition(_ input: UpdateRumMetricDefinitionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateRumMetricDefinitionResponse {
        try await self.client.execute(
            operation: "UpdateRumMetricDefinition", 
            path: "/rummetrics/{AppMonitorName}/metrics", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies one existing metric definition for CloudWatch RUM extended metrics. For  more information about extended metrics, see BatchCreateRumMetricsDefinitions.
    /// API Reference: https://docs.aws.amazon.com/rum/latest/developerguide/UpdateRumMetricDefinitions.html
    ///
    /// Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that sends these metrics.
    ///   - destination: The destination to send the metrics to. Valid values are CloudWatch and Evidently. If you specify Evidently, you must also specify the ARN of the CloudWatchEvidently experiment  that will receive the metrics and an IAM role that has permission to write to the experiment.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that is to receive the metrics. You must have already defined this  experiment as a valid destination. For more information, see PutRumMetricsDestination.
    ///   - metricDefinition: A structure that contains the new definition that you want to use for this metric.
    ///   - metricDefinitionId: The ID of the metric definition to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateRumMetricDefinition(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        metricDefinition: MetricDefinitionRequest,
        metricDefinitionId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateRumMetricDefinitionResponse {
        let input = UpdateRumMetricDefinitionRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            metricDefinition: metricDefinition, 
            metricDefinitionId: metricDefinitionId
        )
        return try await self.updateRumMetricDefinition(input, logger: logger)
    }
}

extension RUM {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: RUM, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension RUM {
    /// Return PaginatorSequence for operation ``batchGetRumMetricDefinitions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func batchGetRumMetricDefinitionsPaginator(
        _ input: BatchGetRumMetricDefinitionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<BatchGetRumMetricDefinitionsRequest, BatchGetRumMetricDefinitionsResponse> {
        return .init(
            input: input,
            command: self.batchGetRumMetricDefinitions,
            inputKey: \BatchGetRumMetricDefinitionsRequest.nextToken,
            outputKey: \BatchGetRumMetricDefinitionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``batchGetRumMetricDefinitions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appMonitorName: The name of the CloudWatch RUM app monitor that is sending the metrics.
    ///   - destination: The type of destination that you want to view metrics for. Valid values are CloudWatch  and Evidently.
    ///   - destinationArn: This parameter is required if Destination is Evidently. If Destination is  CloudWatch, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that corresponds to the destination.
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100. To retrieve the remaining results, make another call with the returned  NextToken value.
    ///   - logger: Logger used for logging
    @inlinable
    public func batchGetRumMetricDefinitionsPaginator(
        appMonitorName: String,
        destination: MetricDestination,
        destinationArn: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<BatchGetRumMetricDefinitionsRequest, BatchGetRumMetricDefinitionsResponse> {
        let input = BatchGetRumMetricDefinitionsRequest(
            appMonitorName: appMonitorName, 
            destination: destination, 
            destinationArn: destinationArn, 
            maxResults: maxResults
        )
        return self.batchGetRumMetricDefinitionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getAppMonitorData(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getAppMonitorDataPaginator(
        _ input: GetAppMonitorDataRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetAppMonitorDataRequest, GetAppMonitorDataResponse> {
        return .init(
            input: input,
            command: self.getAppMonitorData,
            inputKey: \GetAppMonitorDataRequest.nextToken,
            outputKey: \GetAppMonitorDataResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getAppMonitorData(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
    ///   - maxResults: The maximum number of results to return in one operation.
    ///   - name: The name of the app monitor that collected the data that you want to retrieve.
    ///   - timeRange: A structure that defines the time range that you want to retrieve results from.
    ///   - logger: Logger used for logging
    @inlinable
    public func getAppMonitorDataPaginator(
        filters: [QueryFilter]? = nil,
        maxResults: Int? = nil,
        name: String,
        timeRange: TimeRange,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetAppMonitorDataRequest, GetAppMonitorDataResponse> {
        let input = GetAppMonitorDataRequest(
            filters: filters, 
            maxResults: maxResults, 
            name: name, 
            timeRange: timeRange
        )
        return self.getAppMonitorDataPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAppMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppMonitorsPaginator(
        _ input: ListAppMonitorsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAppMonitorsRequest, ListAppMonitorsResponse> {
        return .init(
            input: input,
            command: self.listAppMonitors,
            inputKey: \ListAppMonitorsRequest.nextToken,
            outputKey: \ListAppMonitorsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAppMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAppMonitorsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAppMonitorsRequest, ListAppMonitorsResponse> {
        let input = ListAppMonitorsRequest(
            maxResults: maxResults
        )
        return self.listAppMonitorsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listRumMetricsDestinations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listRumMetricsDestinationsPaginator(
        _ input: ListRumMetricsDestinationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRumMetricsDestinationsRequest, ListRumMetricsDestinationsResponse> {
        return .init(
            input: input,
            command: self.listRumMetricsDestinations,
            inputKey: \ListRumMetricsDestinationsRequest.nextToken,
            outputKey: \ListRumMetricsDestinationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listRumMetricsDestinations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appMonitorName: The name of the app monitor associated with the destinations that you want to retrieve.
    ///   - maxResults: The maximum number of results to return in one operation. The default is 50. The maximum that you can  specify is 100. To retrieve the remaining results, make another call with the returned  NextToken value.
    ///   - logger: Logger used for logging
    @inlinable
    public func listRumMetricsDestinationsPaginator(
        appMonitorName: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRumMetricsDestinationsRequest, ListRumMetricsDestinationsResponse> {
        let input = ListRumMetricsDestinationsRequest(
            appMonitorName: appMonitorName, 
            maxResults: maxResults
        )
        return self.listRumMetricsDestinationsPaginator(input, logger: logger)
    }
}

extension RUM.BatchGetRumMetricDefinitionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> RUM.BatchGetRumMetricDefinitionsRequest {
        return .init(
            appMonitorName: self.appMonitorName,
            destination: self.destination,
            destinationArn: self.destinationArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension RUM.GetAppMonitorDataRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> RUM.GetAppMonitorDataRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            name: self.name,
            nextToken: token,
            timeRange: self.timeRange
        )
    }
}

extension RUM.ListAppMonitorsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> RUM.ListAppMonitorsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension RUM.ListRumMetricsDestinationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> RUM.ListRumMetricsDestinationsRequest {
        return .init(
            appMonitorName: self.appMonitorName,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
